﻿using System;

namespace diantou.web.contest
{
    /// <summary>
    /// 编辑列表
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class externalList : permissionView<externalList>
    {
        /// <summary>
        /// 比赛列表
        /// </summary>
        [fastCSharp.emit.webView.clearMember]
        private diantou.dataAccess.contest[] contests;

        /// <summary>
        /// 初始化问题列表
        /// </summary>
        /// <param name="page">分页号</param>
        /// <returns>是否成功</returns>
        private bool loadView(diantou.dataAccess.contest.getType type, int page)
        {
            if ((currentUser.Permission & dataModel.user.permission.ContestEditor) != 0)
            {
                contests = diantou.dataAccess.clientCache.Contest.Get(diantou.dataAccess.tcpCall.contest.getIds(currentUserId, pageInfo.Size = 20, pageInfo.Page = page, out pageInfo.Count));
                return true;
            }
            AjaxResponse(webConfig.NotFound404);
            return false;
        }
    }
}
